<template>
  <div>
    <MyDialog>
      你确定要删除吗？
    </MyDialog>

    <MyDialog>
      <div style="color: red;">你确定要退出吗？</div>
    </MyDialog>

    <MyDialog>
      请输入内容：<input v-model="msg" @keyup.enter="onEnter" />
    </MyDialog>
  </div>
</template>

<script>
import MyDialog from "./components/MyDialog.vue"
export default {
  data() {
    return {
      msg: ''
    }
  },
  components: {
    MyDialog,
  },
  methods: {
    onEnter() {
      alert('回车了: ' + this.msg)
    }
  }
}
</script>

<style>
body {
  background-color: #b3b3b3;
}
</style>